﻿using System;
using DMS.Business.Utility;

namespace DMS.Web.Common.Controls
{
    public partial class UserInfo : System.Web.UI.UserControl
    {
        private string _FormatString = string.Empty;

        public string FormatString
        {
            get 
            {
                if (!this._FormatString.Contains("{0}"))
                {
                    this._FormatString = "{0}-{1}";
                }

                return _FormatString; 
            }
            set 
            {
                _FormatString = value; 
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.ltlUserName.Text = string.Format(this.FormatString, SystemContext.Current.LoginAuthUser.Name, SystemContext.Current.LoginUser.Dept.Name);
            }
        }
    }
}